home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Univers Mac Interactif 53
/
Univers Mac Interactif - Issue 53.iso
/
UNIVERS MAC 53
/
Newtonissimo
/
Newton Package Installer
/
Newton Package Installer.rsrc
/
TEXT_128.txt
< prev
next >
Wrap
Text File
|
1994-06-20
|
2KB
|
54 lines
begin
local i, ans;
local root := GetRoot();
ans := clone(self.origphrase);
for i := 0 to Length(self.input)-1 do
if (isa(self.input[i], 'commute_action)) then
ans := filterStrings(self.phrases[i], ans);
if (Length(ans) = 0) then
city := nil;
else
city := gluestrings(ans);
if city then
begin
local results, result, theCity, theWC;
theWC := root.worldclock;
results := [];
result := theWC:find(city, results, 'localFind, nil );
if result and length(result.items) <> 0 then
begin
theCity := result.items[0]; // just get one
theWC:SetNewLocation(theCity.entry);
end
else
begin
local cities := userConfiguration.|Commuter.Sharpe|.cities;
for i := 0 to Length(cities) do
begin
if (StrEqual(city, cities[i].name)) then
begin
theCity := cities[i];
break;
end;
end;
if (theCity) then
begin
AddUndoAction( 'SetLocation, [userconfiguration.location] );
userconfiguration.location := theCity;
if theCity.country then
userconfiguration.currentCountry := theCity.country;
if theCity.areaCode then
userconfiguration.currentAreaCode := theCity.areaCode & $ ;
end;
end;
if (theCity) then
root.assistant:close();
else
root.assistant:Duh(nil);
end;
end,